export const formComponentConfig = {
  selectLike: () =>
    import('@/views/purchase-demand/components/formComp/selectLike.vue'),
  categoryName: () =>
    import('@/common/components/search-modal/categoryName.vue'),
};

export const formRenderConfig = {
  baseNo: { label: '基线序号', field: 'baseNo', componentName: 'input' },
  requireNo1: { label: '配套单号', field: 'requireNo', componentName: 'input' },
  materialCode1: {
    label: '物料编码',
    field: 'materialCode',
    componentName: 'inputModal',
    componentProps: {
      title: '物料编码',
      type: 'materialCode',
      valueName: 'materialCode',
      labelName: 'materialName',
    },
  },
  categoryLv3Code: {
    label: '品类名称',
    field: 'categoryLv3Code',
    componentName: 'categoryName',
    componentProps: {
      title: '品类名称',
      type: 'materialCode',
      valueName: 'categoryCode',
      labelName: 'categoryName',
    },
  },
  millTypeCode: {
    label: '机型',
    field: 'millTypeCode',
    componentName: 'inputModal',
    componentProps: {
      title: '机型',
      type: 'machineType',
      valueName: 'materialCode',
      labelName: 'materialName',
      defaultQuery: {
        materialType: '6',
        materialStatus: '1,3',
      },
    },
  },
  batchNo: { label: '批次', field: 'batchNo', componentName: 'input' },
  manufactureLotNo1: {
    label: '架次',
    field: 'manufactureLotNo',
    componentName: 'input',
  },
  checkState1: {
    label: '检验结果',
    field: 'checkState',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'checkState',
    },
  },
  purchaseState: {
    label: '是否采购',
    field: 'purchaseState',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'YN',
    },
  },
  requireSourceType: {
    label: '需求来源',
    field: 'requireSourceType',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'requireSourceType',
    },
  },
  requireSourceType1: {
    label: '需求来源',
    field: 'requireSourceType',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'requireSourceType',
      fitVal: ['2'],
    },
  },
  picNo1: {
    label: '图号',
    field: 'picNo',
    componentName: 'inputModal',
    componentProps: {
      title: '图号',
      type: 'materialCode',
      valueName: 'figureNumber',
      labelName: 'figureNumber',
    },
  },
  useDeptName: {
    label: '使用单位',
    field: 'useDeptName',
    componentName: 'input',
  },
  requireDateStart: {
    label: '需求时间（起）',
    field: 'requireDateStart',
    componentName: 'datePicker',
  },
  requireDateEnd: {
    label: '需求时间（止）',
    field: 'requireDateEnd',
    componentName: 'datePicker',
  },
  categoryLv1Name: {
    label: '一级品类',
    field: 'categoryLv1Name',
    componentName: 'input',
  },
  categoryLv2Name: {
    label: '二级品类',
    field: 'categoryLv2Name',
    componentName: 'input',
  },
  categoryLv3Name: {
    label: '三级品类',
    field: 'categoryLv3Name',
    componentName: 'input',
  },
  machineContent: {
    label: '加工内容',
    field: 'machineContent',
    componentName: 'input',
  },
  outSourceDeptName: {
    label: '外包提出单位',
    field: 'outSourceDeptName',
    componentName: 'input',
  },
  requireDispatchDateStart: {
    label: '需求下达时间（起）',
    field: 'requireDispatchDateStart',
    componentName: 'datePicker',
  },
  requireDispatchDateEnd: {
    label: '需求下达时间（止）',
    field: 'requireDispatchDateEnd',
    componentName: 'datePicker',
  },
  requireNo2: {
    label: '配套单号/采购需求计划编号',
    field: 'requireNo',
    componentName: 'input',
  },
  originalOrderForm1: {
    label: '原始单据表名',
    field: 'originalOrderForm',
    componentName: 'input',
  },
  manufactureLotNo: {
    label: '架次/台份',
    field: 'manufactureLotNo',
    componentName: 'input',
  },
  productTypeNo1: {
    label: '型号',
    field: 'productTypeNo',
    componentName: 'inputModal',
    componentProps: {
      title: '型号',
      type: 'materialCode',
      valueName: 'modelMark',
      labelName: 'modelMark',
    },
  },
  supplierCode: {
    label: '供应商',
    field: 'supplierCode',
    componentName: 'inputModal',
    componentProps: {
      title: '供应商',
      type: 'supplyName',
      valueName: 'supplierCode',
      labelName: 'supplierChinese',
    },
  },
  productSuperTypeNo: {
    label: '成品父型号',
    field: 'productSuperTypeNo',
    componentName: 'inputModal',
    componentProps: {
      title: '成品父型号',
      type: 'materialCode',
      valueName: 'parentModel',
      labelName: 'parentModel',
    },
  },
  substanceBrand1: {
    label: '牌号',
    field: 'substanceBrand',
    componentName: 'inputModal',
    componentProps: {
      title: '牌号',
      type: 'materialCode',
      valueName: 'modelMark',
      labelName: 'modelMark',
    },
  },
  specification: {
    label: '规格',
    field: 'specification',
    componentName: 'inputModal',
    componentProps: {
      title: '规格',
      type: 'materialCode',
      valueName: 'specification',
      labelName: 'specification',
    },
  },
  manufactureType: {
    label: '制造类型',
    field: 'manufactureType',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'manufactureType',
    },
  },
  requireNo: {
    label: '采购需求计划编号',
    field: 'requireNo',
    componentName: 'input',
  },
  divideRoute1: {
    label: '分工路线',
    field: 'divideRoute',
    componentName: 'input',
  },
  applyDeptName: {
    label: '申请单位',
    field: 'applyDeptName',
    componentName: 'input',
  },
  planType: {
    label: '计划类型',
    field: 'planType',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'planType',
    },
  },
  picNoExternalCode: {
    label: '图号外协码',
    field: 'picNoExternalCode',
    componentName: 'input',
  },
  machineNoExternalCode: {
    label: '机型外协码',
    field: 'machineNoExternalCode',
    componentName: 'input',
  },
  materialName: {
    label: '物料名称',
    field: 'materialName',
    componentName: 'input',
  },

  like: {
    label: '喜欢',
    field: 'like',
    componentName: 'selectLike',
    componentProps: {},
  },
};
